<!DOCTYPE html>
<html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<!--
<link rel="stylesheet" type="text/css" href="catalog/view/theme/gw/stylesheet/stylesheet.css" />
-->
<link href="catalog/view/theme/gw/css/bootstrap.css" rel="stylesheet">
<link href="catalog/view/theme/gw/css/bootstrap-responsive.css" rel="stylesheet">
<link href="catalog/view/theme/gw/css/add.css" rel="stylesheet">


<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />
<script type="text/javascript" src="catalog/view/javascript/common.js"></script>

<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<!--[if IE 7]> 
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie7.css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie6.css" />
<script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('#logo img');
</script>
<![endif]-->
<?php if ($stores) { ?>
<script type="text/javascript"><!--
$(document).ready(function() {
<?php foreach ($stores as $store) { ?>
$('body').prepend('<iframe src="<?php echo $store; ?>" style="display: none;"></iframe>');
<?php } ?>
});
//--></script>
<?php } ?>
<?php echo $google_analytics; ?>
</head>
<body>
<div class="container">

<div class="header">
  
  <?php if ($logo) { ?>
  <a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" id="logo" /></a>
  <?php } ?>
  
  <div class="navbar">
    <div class="container">
      <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target="#top">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <div class="nav-collapse nav-collapse collapse" id="top">
        <ul class="nav navbar-nav">
          <li><a href='#'>SHOP</a></li>
          <li><a href='#'>SINCE</a></li>
          <li><a href='#'>What's New</a></li>
          <li><a href='#'>Lookbook</a></li>
          <li><a href='#'>Giga4life</a></li>
          <li class="dropdown hide">
            <a href="#" class="dropdown-toggle js-activated" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li><a href="#">Action</a></li>
              <li><a href="#">Another action</a></li>
              <li><a href="#">Something else here</a></li>
              <li class="divider"></li>
              <li class="dropdown-header">Dropdown header</li>
              <li><a href="#">Separated link</a></li>
              <li><a href="#">One more separated link</a></li>
            </ul>
          </li>
        </ul>
      </div> <!-- .nav-collapse -->
    </div> <!-- .container -->
  </div> <!-- .navbar -->


  <?php echo $language; ?>
  <?php echo $currency; ?>
  <?php echo $cart; ?>
  <div class="search">
    <div class="button-search"></div>
    <input type="text" name="search" placeholder="<?php echo $text_search; ?>" value="<?php echo $search; ?>" />
  </div>

  <div class="welcome">
    <?php if (!$logged) { ?>
    <?php echo $text_welcome; ?>
    <?php } else { ?>
    <?php echo $text_logged; ?>
    <?php } ?>
  </div>

  <div class="links">
    <a href="<?php echo $home; ?>"><?php echo $text_home; ?></a>
    <a href="<?php echo $wishlist; ?>" id="wishlist-total"><?php echo $text_wishlist; ?></a>
    <a href="<?php echo $account; ?>"><?php echo $text_account; ?></a>
    <a href="<?php echo $shopping_cart; ?>"><?php echo $text_shopping_cart; ?></a>
    <a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a>
  </div>

</div>
<?php if ($categories) { ?>
<div class="navbar">
    <div class="container">
      <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target="#cat">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <div class="nav-collapse nav-collapse collapse" id='cat'>
        <ul class="nav navbar-nav">
          <?php foreach ($categories as $category) { ?>
           <!-- start -->
          
            <?php if ($category['children']) { ?>
              <li class="dropdown">
                <a href="<?php echo $category['href']; ?>" class="dropdown-toggle js-activated" data-toggle="dropdown"><?php echo $category['name']; ?>
                  <b class="caret"></b>
                </a>
              <?php for ($i = 0; $i < count($category['children']);) { ?>
              <ul class="dropdown-menu">
                <?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
                <?php for (; $i < $j; $i++) { ?>
                <?php if (isset($category['children'][$i])) { ?>
                <li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
                <?php } ?>
                <?php } ?>
              </ul>
              <?php } ?>
            </li>
            <?php } else { ?>
            <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
            <?php } ?>
           <!-- end -->
          <?php } ?>
        </ul>
      </div> <!-- .nav-collapse -->
    </div> <!-- .container -->
  </div> <!-- .navbar -->
<?php } ?>

<div>


</div>

<?php if ($categories) { ?>
<div id="menu" class='hide'>
  <ul>
    <?php foreach ($categories as $category) { ?>
    <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
      <?php if ($category['children']) { ?>
      <div>
        <?php for ($i = 0; $i < count($category['children']);) { ?>
        <ul>
          <?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
          <?php for (; $i < $j; $i++) { ?>
          <?php if (isset($category['children'][$i])) { ?>
          <li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
          <?php } ?>
          <?php } ?>
        </ul>
        <?php } ?>
      </div>
      <?php } ?>
    </li>
    <?php } ?>
  </ul>
</div>
<?php } ?>


<?php if ($error) { ?>
    <div class="warning"><?php echo $error ?><img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>
<?php } ?>

<div id="notification"></div>